package example.lesson06_01;

public class TestFinal {
    public static void main(String[] args) {
        SuperClass obj=new SuperClass();
        obj.method(10);
    }

}

//final类不能被继承

class SuperClass{

    final static int field_class;
    static {
        field_class=10;
    }

   final int field;

   public SuperClass(){
       field=10;
   }

    final void method(final int arg){
       final int localVar=10;

    }
}
//final方法不能被重写
class SubClass extends SuperClass{
    //Alt+Insert//
    // Ctrl+O快捷键

    //@Override
    //void method() {
        //super.method();
    //}
}